{% extends "mybase2.html" %} 
{% block head %}
{#
     <!-- 引入 Bootstrap CSS -->
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<!-- 引入 Bootstrap JS 和 Popper.js -->
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

    #}
{% endblock %}

{% block title %}用户注册{% endblock %} 

{% block content %}
{#
<div class="container mt-5">
   <div style="text-align: center;">
        <h2 class="mb-4">Register</h2>
        <form method="POST" action="{{ url_for('auth.register') }}">
            {{ form.hidden_tag() }}
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" class="form-control" id="username" name="username" placeholder="请输入用户名" required>
            </div>
            <br>
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" class="form-control" id="password" name="password" placeholder="密码" required>
            </div>
             <br>
            <div class="form-group">
                <label for="confirm_password">确认密码</label>
                <input type="password" class="form-control" id="repassword" name="repassword" placeholder="确认密码" required>
            </div>
             <br>
            <button type="submit" class="btn btn-primary">Register</button>
        </form>
        <p class="mt-3">已经有账户? <a href="{{ url_for('auth.login') }}">Login here</a></p>
  </div>
</div>  #}


<div style="text-align: center">
	<h1>用户注册</h1>

	<form action="{{ url_for('auth.register') }}" method="post">
		<p><input type="text" name="username" placeholder="用户名" required /></p>
		<p><input type="password" name="password" placeholder="密码" required /></p>
		<p><input type="password" name="repassword" placeholder="确认密码" required /></p>
		<p><input type="text" name="phone" placeholder="手机号" required /></p>
		<p><input type="submit" value="用户注册" /></p>
	</form>

    {#
         <form method="post">
        {{ form.hidden_tag() }}
        {{ form.username.label }}
        {{ form.username(size=32) }}
        <br>

        {{ form.password.label }}
        {{ form.password(size=32) }}
        <br>

        {{ form.repassword.label }}
        {{ form.repassword(size=32) }}
        <br>

        {{ form.phone.label }}
        {{ form.phone(size=32) }}
        <br>
        {{ form.submit()}}

    </form>
        #}
</div>
{% endblock %} 

{# 
    {{ form.hidden_tag() }}
        <p>
            {{ form.username.label }}<br />
            {{ form.username(size=32) }}<br />
            {% for error in form.username.errors %}
            <span style="color: red">[{{ error }}]</span>
            {% endfor %}
        </p>
        <p>
            {{ form.email.label }}<br />
            {{ form.email(size=64) }}<br />
            {% for error in form.email.errors %}
            <span style="color: red">[{{ error }}]</span>
            {% endfor %}
        </p>
        <p>
            {{ form.password.label }}<br />
            {{ form.password(size=32) }}<br />
            {% for error in form.password.errors %}
            <span style="color: red">[{{ error }}]</span>
            {% endfor %}
        </p>
        <p>
            {{ form.password2.label }}<br />
            {{ form.password2(size=32) }}<br />
            {% for error in form.password2.errors %}
            <span style="color: red">[{{ error }}]</span>
            {% endfor %}
        </p>
<p>{{ form.submit() }}</p>
#}
